package com.sunducation.co.cw;

/**
 * @description: 测试重载方法，方法调用的顺序
 * 结论String类是Object的子类，重载的时候按照子类的优先被调用的顺序执行
 * @author:chenwenbiao
 * @createTime:2019/7/8 19:11
 * @Version：1.0
 **/
public class ParamTest {

    public void mathodChoose(String name){
        System.out.println("param type is String:" + name);
    }

    public void mathodChoose(Object name){
        System.out.println("param type is Object: " + name);
    }

    public static void main(String[] argv){
        ParamTest paramTest = new ParamTest();
        paramTest.mathodChoose(null);
    }

}
